package com.javaclimb.music.service.impl;

import com.javaclimb.music.dao.SongMapper;
import com.javaclimb.music.domain.Song;
import com.javaclimb.music.service.SongService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SongServiceImpl implements SongService {
    @Autowired
    private SongMapper songMapper;

    @Override
    public List<Song> query(Integer singerId) {
        return songMapper.query(singerId);
    }

    @Override
    public int deleteAll(List<Integer> songIds) {
        return songMapper.deleteAll(songIds);
    }

    @Override
    public List<Song> selectSongName(Song song) {
        return songMapper.selectSongName(song);
    }

    @Override
    public int insertSong(Song song) {
        return songMapper.insertSong(song);
    }

    @Override
    public int update(Song song) {
        return songMapper.update(song);
    }

    @Override
    public int delete(Integer songId) {
        return songMapper.delete(songId);
    }

    @Override
    public Song selectSong(Integer songId) {
        return songMapper.selectSong(songId);
    }
}
